package com.zy.openchat.core.model.remittance;

import android.os.Parcel;
import android.os.Parcelable;

public class RemittanceInfo implements Parcelable {

    public long chatId;

    public String description;

    public float amount;

    public String password;

    public int type;

    public long payee;

    public long payer;

    public long remittanceId;

    public RemittanceDetailInfo detail;




    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(this.chatId);
        dest.writeString(this.description);
        dest.writeFloat(this.amount);
        dest.writeString(this.password);
        dest.writeInt(this.type);
        dest.writeLong(this.payee);
        dest.writeLong(this.payer);
        dest.writeLong(this.remittanceId);
    }

    public void readFromParcel(Parcel source) {
        this.chatId = source.readLong();
        this.description = source.readString();
        this.amount = source.readFloat();
        this.password = source.readString();
        this.type = source.readInt();
        this.payee = source.readLong();
        this.payer = source.readLong();
        this.remittanceId = source.readLong();
    }

    public RemittanceInfo() {
    }

    protected RemittanceInfo(Parcel in) {
        this.chatId = in.readLong();
        this.description = in.readString();
        this.amount = in.readFloat();
        this.password = in.readString();
        this.type = in.readInt();
        this.payee = in.readLong();
        this.payer = in.readLong();
        this.remittanceId = in.readLong();
    }

    public static final Creator<RemittanceInfo> CREATOR = new Creator<RemittanceInfo>() {
        @Override
        public RemittanceInfo createFromParcel(Parcel source) {
            return new RemittanceInfo(source);
        }

        @Override
        public RemittanceInfo[] newArray(int size) {
            return new RemittanceInfo[size];
        }
    };
}
